<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.staticfile.org/echarts/5.3.0/echarts.min.js"></script>
</head>
<body>
   <div id="lineChart" style="height: 400px;width:600px;background:white;margin:20px 0 0;"></div>
   <div id="lineChart2" style="height: 400px;width:600px;background:white;margin:20px 0 0;"></div>
</body>
<script>
    // 绘制图表，准备数据
    var lineChart = {
        dataZoom: {
            type:'inside',//slider
            //orient:'horizontal'//vertical
        },
        toolbox: {
            show: true,
            feature: {
                dataZoom: {yAxisIndex:'none'}
            }
        },
        title: {
            text: '折线图'
        },
        tooltip: {
            trigger: 'axis'
        },
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value'
        },
        series: [{
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            type: 'line',
            smooth:true
        }]
    };

    //初始化echarts实例
    var myLineChart = echarts.init(document.getElementById('lineChart'));

    //使用制定的配置项和数据显示图表
    myLineChart.setOption(lineChart);

    var lineChart2 = {
        dataZoom: {
            type:'inside',//slider
            //orient:'horizontal'//vertical
        },
        toolbox: {
            show: true,
            feature: {
                dataZoom: {yAxisIndex:'none'}
            }
        },
        title: {
            text: '折线图'
        },
        tooltip: {
            trigger: 'axis',
            show:true
        },
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value'
        },
        series: [{
            data: [820, 932, 901, 934, 1290, 1330, 1500],
            type: 'line'
        }]
    };
    var myLineChart2 = echarts.init(document.getElementById('lineChart2'));

    //使用制定的配置项和数据显示图表
    myLineChart2.setOption(lineChart2);
</script>
</html>